﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure.StorageClient;

namespace Thor.Repository.Azure.Table
{
    internal class AppointmentRow : TableServiceEntity
    {
        #region Constructors

        public AppointmentRow() : base() { }

        public AppointmentRow(string applicationName, string appointmentId)
            : base(applicationName, appointmentId)
        {
            ApplicationName = applicationName;

        }

        #endregion

        #region Properties

        /// <summary>
        /// Name of the application accessing the table.
        /// </summary>
        public string ApplicationName { get; set; }

        /// <summary>
        /// The id of the calendar the appointment is tied to.
        /// </summary>
        public string CalendarId { get; set; }

        /// <summary>
        /// The appointment's start time.
        /// </summary>
        /// <remarks>
        /// Due to how Azure converts date times to utc prior to storage
        /// I'm storing this as strings so the app can manage date/time
        /// conversions.
        /// </remarks>
        public string StartTime { get; set; }

        /// <summary>
        /// The appointment's end time.
        /// </summary>
        /// <remarks>
        /// Due to how Azure converts date times to utc prior to storage
        /// I'm storing this as strings so the app can manage date/time
        /// conversions.
        /// </remarks>
        public string EndTime { get; set; }

        /// <summary>
        /// The subject of the appointment.
        /// </summary>
        public string Subject { get; set; }

        /// <summary>
        /// Unique id of the calendar.
        /// </summary>
        public Guid Id { get; set; }

        #endregion
    }
}
